package com.example.hzcccc.weather;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by hzcccc on 2016/3/10.
 */
public class BaseFragment extends android.support.v4.app.Fragment {


    SQLdm s = new SQLdm();
    SQLiteDatabase db = s.openDatabase(getContext());
    Cursor cursor = db.rawQuery("SELECT * FROM managercity", null);
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }



    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_layout, container, false);
        Bundle args = this.getArguments();
        String sToady = args.getString("today");
        String sTomorrow = args.getString("tomorrow");
        String sTDAT = args.getString("tdat");
        TextView mToday = (TextView) view.findViewById(R.id.today);
        TextView mTomorrow = (TextView) view.findViewById(R.id.tomorrow);
        TextView mTDAT = (TextView) view.findViewById(R.id.TDAT);
        mToday.setText(sToady);
        mTomorrow.setText(sTomorrow);
        mTDAT.setText(sTDAT);



        return view;
    }



}
